import Vue from 'vue'
import App from './App'
import * as filters from './filters'
Object.keys(filters).forEach(key => {
	Vue.filter(key, filters[key])
})
import uView from 'uview-ui'
Vue.use(uView)
import uniNavbar from "./components/uni-navbar"
Vue.component('uni-navbar', uniNavbar)
import store from './store'
Vue.prototype.$store = store
import * as utils from './utils'
Object.keys(utils).forEach(key => {
	Vue.prototype["$" + key] = utils[key]
})
import WxmpRsa from 'wxmp-rsa'
Vue.prototype.$rsa = function(value) {
	const rsa = new WxmpRsa()
	rsa.setPublicKey(
		'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMriq7pzPIZ3ug65eEb1samm+RsqfIUUqUHLafLWqHzdH35FfpvuycnLP82Rb0EXoaUvNR7EQbVJO9v6gzGEL1qylit5YL2TdNwWw/5ZKcn6PbDHwVJeqHuEWls+aPPnWqVJxrXJ77BuSyZrx3CjE4EDATxTt2PwZ/CwYzpjK1DQIDAQAB'
	)
	return rsa.encrypt(value)
}

App.mpType = 'app'
const app = new Vue({
	...App
})
app.$mount()
